package com.xinggq.pay.service.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xinggq.pay.service.entity.PayOrderEntity;
import com.xinggq.pay.service.enums.PayChannelEnum;

/**
 * 支付订单服务接口
 * @author xinggq
 * @since 2025/9/16
 */
public interface PayOrderService extends IService<PayOrderEntity> {

    /**
     * 根据平台订单号查询订单
     */
    PayOrderEntity findByTradeNo(String tradeNo);

    /**
     * 根据商户订单号查询订单
     */
    PayOrderEntity findByMerchantOrderNo(String merchantOrderNo);

    /**
     * 根据支付渠道订单号和支付渠道查询订单
     */
    PayOrderEntity findByChannelTradeNoAndChannelType(String channelTradeNo, PayChannelEnum payChannelType);

}